#include <math.h>
#include <stdio.h>
#include <string.h>
int main()
{
    int n;
    scanf("%d", &n);
    int m = -1, w = -1, c = -1;
    if (n <= 2)
    {
        printf("None");
    }
    else
    {
        int i = 0;
        for (i = n / 2; i >= 0; i--)
        {
            if ((n - 3 * i) % 5 == 0 && (4 * n - 2 * i) % 5 == 0)
            {
                m = (n - 3 * i) / 5;
                w = i;
                c = (4 * n - 2 * i) / 5;
                if (m >= 0 && c >= 0)
                {
                    printf("men = %d, women = %d, child = %d\n", m, w, c);
                }
            }
        }
        if (c == -1 && m == -1 && w == -1)
        {
            printf("None");
        }
    }
    return 0;
}